package com.wsc.decorator;

public class Main {
    public static void main(String[] args) {
        Shape circle = new Circle();
        ShapeDecorator redCircle = new RedShapeDecorator(circle);
        ShapeDecorator redRectangle = new RedShapeDecorator(new Rectangle());

        // 又加边框又加尾巴
        ShapeDecorator tailCircle = new TailDecorator(redCircle);

        System.out.println("Circle with normal border");
        circle.draw();

        // 使用装饰器
        System.out.println("Circle with red border");
        redCircle.draw();

        System.out.println("Circle with tail");
        tailCircle.draw();

        System.out.println("Rectangle with red border");
        redRectangle.draw();
    }
}
